{extend name="public/base"/}
 {block name="content"}
       <section class="content-header">
<h1>
           内容编辑
<small>Optional description</small>
</h1>
<ol class="breadcrumb">
	<li><a href="{:U('Index/index')}"><i class="fa fa-dashboard"></i>首页</a></li>
	<li class="active"> 内容编辑</li>
</ol>
</section>
<form action="{:U('Content/postEdit',array('id'=>$edit_info['id'],'term_id'=>$_GET['term_id'],'model_id'=>$_GET['model_id']))}" method="post">
	<input type="hidden" name="id" value="{$edit_info.id}">
	<input type="hidden" name="cover_img" id="imgs" value="">
	<input type="hidden" name="status" value="0">
	<input type="hidden" name="rec_ok" value="0">
	<input type="hidden" name="top_ok" value="0">
	<section class="content">
	<div class="row">
		<div class="col-md-12">
			<div class="box">
			
				<!--输入框 -->
				<div class="box-body pad" style="padding:10px 20px;">
					<input class="form-control" name="title" value="{$edit_info.name}" placeholder="标题">
				</div>
				<div class="box-body pad" style="padding:10px 20px;">
					<input class="form-control" name="keywords" value="{$edit_info.keywords}" placeholder="关键词">
				</div>
				<div class="box-body pad" style="padding:10px 20px 0px 20px;">
					<textarea class="form-control" id="des" rows="4" name="description" placeholder="摘要描述(150字以内)">{$edit_info.description}</textarea>
				</div>
				<!--输入框 END-->
				
				<!-- editor -->
				<div class="box-body pad">
					<script type="text/javascript" charset="utf-8" src="__PLUGINS__ueditor/ueditor.config.js"></script>
					<script type="text/javascript" charset="utf-8" src="__PLUGINS__ueditor/ueditor.all.min.js"> </script>
					<script type="text/javascript" charset="utf-8" src="__PLUGINS__ueditor/lang/zh-cn/zh-cn.js"></script>
					<script type="text/javascript" charset="utf-8" src="__PLUGINS__ueditor/js_ueditor.js"></script>
					<textarea id="editor" class="textarea" name="content" placeholder=""
					style="width: 100%;height:300px;font-size: 14px; line-height: 18px;padding: 10px;">{$edit_info.content}</textarea>
				</div>
				<!-- editor end -->
				
				
				
				<div style="padding-top:8px 0px 0px 10px;">
				<input type="checkbox" class="dese" {if condition="($edit_info.intercept eq 1)"}checked="checked"{/if} value="1" name="intercept"> 是否截取内容 
				<input type="text" size="3"  value="150"  class="fontsize">字符至内容摘要 
				</div>
				
					<script>
					$(document).ready(function(){
					  $(".dese").click(function(){
					    
						if($('.dese').is(':checked')) {
						var TEST = UE.getEditor('editor').getContentTxt();
						var SIZE = $(".fontsize").val();
						$("#des").val(TEST.substr(0,SIZE));
						}
						
					    });
					});
					</script>
				
	            	<!-- 推荐 显示 置顶-->
		显示：<input type="checkbox" name="status" {if condition="$edit_info.status eq 1"}checked="checked"{/if} value="1">
		推荐：<input type="checkbox" name="rec_ok" {if condition="$edit_info.rec_ok eq 1"}checked="checked"{/if} value="1">
		置顶：<input type="checkbox" name="top_ok" {if condition="$edit_info.top_ok eq 1"}checked="checked"{/if} value="1">
					
					<!-- 推荐 显示 置顶 END-->
				
				<!-- WEBUPLODER -->
				<div id="uploader" class="wu_uploader">
					<div id="fileList" class="uploader-list">
					</div>
					<div id="filePicker">
						选择图片
					</div>
				</div>
				<!-- WEBUPLODER END-->
                {foreach $formList as $name => $form}
                <h3> {$name}</h3>
                <div class="box-body pad" style="padding:10px 20px;">
                {$form}
                </div>
                {/foreach}

			</div>
		</div>
	</div>


	</section>
	<input type="submit" class="btn btn-block btn-primary" style="width:100px; border:none; margin-bottom:20px;float:right;" value="Submit"/>
	<div style="clear:both">
	</div>
</form>
 {/block}
